package com.ruoyi.back.v2.domain

import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty


@ApiModel("推广统计实体")
data class SpreadStatistics(

    @ApiModelProperty("用户总人数")
    var totalUserNum: Int? = null,

    @ApiModelProperty("推广注册用户新增趋势")
    var spreadAddUserData: List<SpreadAddUserData>? = initSpreadAddUserData(),
)

fun initSpreadAddUserData(): List<SpreadAddUserData> = listOf(
    SpreadAddUserData().apply {
        time = "00"
        userNum = 0
    },
    SpreadAddUserData().apply {
        time = "03"
        userNum = 0
    },SpreadAddUserData().apply {
        time = "06"
        userNum = 0
    },
    SpreadAddUserData().apply {
        time = "09"
        userNum = 0
    },
    SpreadAddUserData().apply {
        time = "12"
        userNum = 0
    },
    SpreadAddUserData().apply {
        time = "15"
        userNum = 0
    },
    SpreadAddUserData().apply {
        time = "18"
        userNum = 0
    },
    SpreadAddUserData().apply {
        time = "21"
        userNum = 0
    },
    SpreadAddUserData().apply {
        time = "23"
        userNum = 0
    }
)

@ApiModel("推广统计搜索参数")
data class SpreadStatisticsSearchParam(

    @ApiModelProperty("筛选类型 0.今日 1.昨日 2.7日 3.30日")
    var type: Int? = 0,

    @ApiModelProperty("开始时间")
    var beginTime: String? = null,

    @ApiModelProperty("结束时间")
    var endTime: String? = null,
)

@ApiModel("用户新增折线图数据")
data class SpreadAddUserData(

    @ApiModelProperty("x轴")
    var time: String? = null,

    @ApiModelProperty("y轴")
    var userNum: Int? = 0,
)

@ApiModel("推广注册用户实体")
data class SpreadRegisterUser(

    @ApiModelProperty("编号")
    var id: Long? = null,

    @ApiModelProperty("用户ID")
    var userId: String? = null,

    @ApiModelProperty("用户名")
    var userName: String? = null,

    @ApiModelProperty("消费金额")
    var consumerMoney: Double? = 0.0,

    @ApiModelProperty("累计收益")
    var totalEmployee: Double? = 0.0,

    @ApiModelProperty("上级用户")
    var firstLevelUser: String? = null,

    @ApiModelProperty("上上级用户")
    var secondLevelUser: String? = null,

    @ApiModelProperty("注册方式 1.微信 2.qq 3.手机号")
    var loginType: Int? = null,

    @ApiModelProperty("注册时间")
    var registerTime: String? = null,
)

@ApiModel("推广信息")
data class SpreadUserInfo(

    @ApiModelProperty("编号")
    var id: Long? = null,

    @ApiModelProperty("用户ID")
    var userId: String? = null,

    @ApiModelProperty("用户名")
    var userName: String? = null,

    @ApiModelProperty("邀请人数")
    var inviteNum: Int? = 0,

    @ApiModelProperty("消费金额")
    var consumerMoney: Double? = 0.0,

    @ApiModelProperty("累计收益")
    var totalEmployee: Double? = 0.0,

    @ApiModelProperty("已提现")
    var haveWithdraw: Double? = 0.0,

    @ApiModelProperty("收益余额")
    var employeeRetain: Double? = 0.0,

    @ApiModelProperty("提现申请")
    var withdrawApplication: Double? = 0.0,

    @ApiModelProperty("提现申请id 如果用户有提现申请 这个值作为提现审批的入参")
    var withdrawId: Long? = null,

    @ApiModelProperty("上级收益余额")
    var firstLevelEmployeeRetain: Double? = 0.0,

    @ApiModelProperty("上上级收益余额")
    var secondLevelEmployeeRetain: Double? = 0.0,
)


@ApiModel("推广信息搜索参数")
data class  SpreadUserInfoSearchParam(

    @ApiModelProperty("所属层级 1.一级 2.二级 不传为全部")
    var levelType: Int? = null,

    @ApiModelProperty("用户名或者id")
    var userInfo: String? = null,

    @ApiModelProperty("推广信息查看 需要传递用户id")
    var userId: Long? = null,

    @ApiModelProperty("这个参数不传默认查询全部 传true则查询提现申请的列表")
    var withdraw: Boolean? = null,
)

@ApiModel("推广信息等级实体")
data class SpreadUserLevelInfo(

    @ApiModelProperty("编号")
    var id: Long? = null,

    @ApiModelProperty("所属层级 1.一级 2.二级")
    var levelType: Int? = null,

    @ApiModelProperty("用户ID")
    var userId: String? = null,

    @ApiModelProperty("用户名")
    var userName: String? = null,

    @ApiModelProperty("邀请人数")
    var inviteNum: Int? = 0,

    @ApiModelProperty("消费金额")
    var consumerMoney: Double? = 0.0,

    @ApiModelProperty("累计收益")
    var totalEmployee: Double? = 0.0,

    @ApiModelProperty("已提现")
    var haveWithdraw: Double? = 0.0,

    @ApiModelProperty("收益余额")
    var employeeRetain: Double? = 0.0,

    @ApiModelProperty("提现申请")
    var withdrawApplication: Double? = 0.0,

    @ApiModelProperty("上级收益余额")
    var firstLevelEmployeeRetain: Double? = 0.0,

    @ApiModelProperty("上上级收益余额")
    var secondLevelEmployeeRetain: Double? = 0.0,
)

@ApiModel("提现审核")
data class WithDrawCheck(

    @ApiModelProperty("提现申请id ")
    var withdrawId: Long? = null,

    @ApiModelProperty("审核状态 1审核成功 2审核失败")
    var checkStatus: Int? = null,

    @ApiModelProperty("失败原因")
    var errorMsg: String? = null,
)

@ApiModel("修改收益余额")
data class UpdateEmployeeMoney(

    @ApiModelProperty("修改的金额")
    var money: Double? = null,

    @ApiModelProperty("修改的用户id")
    var userId: Long? = null
)

@ApiModel("提现记录")
data class WithdrawRecord(

    @ApiModelProperty("编号")
    var id: Long? = null,

    @ApiModelProperty("提现金额")
    var money: Double? = null,

    @ApiModelProperty("1. 微信 2.支付宝")
    var withdrawType: Int? = null,

    @ApiModelProperty("审核状态 0待审核 1审核成功 2审核失败")
    var checkStatus: Int? = 0,

    @ApiModelProperty("申请提现时间")
    var createTime: String? = null,
)


